import http from "../request.js";
let url = "/admin/power/";

// insertPowerCardTemp
export function insertPowerCardTemp(data) {
	return http.request({
		url: url + "insertPowerCardTemp",
		data,
		method: "post",
	});
}

// 详情
export function selectCardById(data) {
	return http.request({
		url: url + "selectCardById",
		params: data,
	});
}
// 详情
export function selectCardTempById(data) {
	return http.request({
		url: url + "selectCardTempById",
		params: data,
	});
}
// 详情
export function selectPowerCardDataByNumber(data) {
	return http.request({
		url: url + "selectPowerCardDataByNumber",
		params: data,
	});
}
export function selectServicesByParentIdAndName(data) {
	return http.request({
		url: url + "selectServicesByParentIdAndName",
		data,
		method: "post",
	});
}
// 详情
export function selectUserCardTrendAnalyse(data) {
	return http.request({
		url: url + "selectUserCardTrendAnalyse",
		data,
		method: "post",
	});
}
// 详情
export function updateCardTempStatus(data) {
	return http.request({
		url: url + "updateCardTempStatus",
		params: data,
	});
}
// 详情
export function updateUserCardStatus(data) {
	return http.request({
		url: url + "updateUserCardStatus",
		params: data,
	});
}

// 列表
export function selectOnlinePowerCardList(data) {
	return http.request({
		url: url + "selectOnlinePowerCardList",
		data,
		method: "post",
	});
}
// 列表
export function selectPowerCardList(data) {
	return http.request({
		url: url + "selectPowerCardList",
		data,
		method: "post",
	});
}
// 列表
export function selectUserCardByPowerNumber(data) {
	return http.request({
		url: url + "selectUserCardByPowerNumber",
		data,
		method: "post",
	});
}

export function deriveRedeemCode(data) {
	return http.request({
		url: url + "deriveRedeemCode",
		data,
		method: "post",
	});
}
// 权益卡使用明细
export function usageDetailsOfEquityCards(data) {
	return http.request({
		url: url + "usageDetailsOfEquityCards",
		data,
		method: "post",
	});
}
// 导出权益卡使用明细
export function exportBenefitCardUsageDetails(data) {
	return http.request({
		url: url + "exportBenefitCardUsageDetails",
		data,
		method: "post",
	});
}